#include "stdafx.h"
#include "resource.h"
#include <sstream>

#include "IdoComplete.h"

namespace quicks {
	
	void MatchStringToWString(const matchstring& ms, wstring& ws) {
		ws.clear();
		ws.reserve(ms.size());
		for (matchstring::const_iterator it = ms.begin(); it != ms.end(); it++) {
			ws.push_back(it->c);
		}
	}
	void WStringToMatchStringUnMatched(const wstring& ws, matchstring& ms) {
		ms.clear();
		ms.reserve(ws.size());
		for (wstring::const_iterator it = ws.begin(); it != ws.end(); it++) {
			matchchar_t c;
			c.c = *it;
			c.matches = false;
			ms.push_back(c);
		}
	}
	void WStringToString(const wstring& ws, string& s) {
		s.clear();
		s.reserve(s.size());
		for (wstring::const_iterator it = ws.begin(); it != ws.end(); it++) {
			s.push_back((char)*it);
		}
	}
}